<%-- 
    Document   : SetTutorialClass
    Created on : 9/05/2008, 13:49:37
    Author     : DidierLeung
--%>

<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Set Subject Page</title>
    </head>
    <body>
        <f:view>
            <h:form id="setTutorialClassForm">
                <table>
                    <tr>
                        <td colspan="3">
                            <h2>
                                <h:outputLabel id="headerLbl" value="Set Tutorial Class for subject '#{SetSubjectBean.subjectCode} - #{SetSubjectBean.subjectName}'" />
                            </h2> 
                        </td>
                    </tr>
                    <tr>
                        <td colspan="3">
                            <h:outputLabel id="selectErrorMsg" value="#{SetSubjectBean.errorMsg}"
                                     style="color: red; font-family: 'New Century Schoolbook', serif;
                                        font-style: oblique"/>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="3">
                            <h:dataTable id="tcTable" value="#{SetSubjectBean.tutorialClassList}" var="tcObj" cellpadding="3">
                                <h:column>
                                    <b>
                                        <h:outputLabel id="tcLbl" value="Tutorial Class No #{tcObj.tutorialClassNo}" />
                                    </b>
                                    <br />
                                    <b>Staff In Charge: </b>
                                    <h:selectOneMenu id="staffIDMenu" value="#{tcObj.staffID}">
                                        <f:selectItems value="#{tcObj.selectStaffList}" />
                                    </h:selectOneMenu>
                                    <br />
                                    <hr />
                                </h:column>
                            </h:dataTable>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <h:commandButton id="backBtn" value="< Back" action="back"/>
                        </td>
                        <td>
                            <h:commandButton id="registerBtn" value="Register" action="#{SetSubjectBean.registerSubject}"/>
                        </td>
                        <td>
                            <h:commandButton id="cancelBtn" value="Cancel" action="cancel"/>
                        </td>
                    </tr>
                </table>
            </h:form>
        </f:view>
    </body>
</html>